Improve test to prevent infinite loop. (#74952, Thomas Leonard)
authorOwen Taylor <otaylor@redhat.com>
Wed, 20 Mar 2002 17:04:32 +0000 (17:04 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Wed, 20 Mar 2002 17:04:32 +0000 (17:04 +0000)
Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c: Improve test to prevent infinite
        loop. (#74952, Thomas Leonard)

        * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
        Fix warning when toplevel menu shell isn't a menu
        bar. (Thomas Leonard, #75602)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentry.c
gtk/gtkmenushell.c

index ebb3bbb4e152cc69ff373d59caaaf4cae49f5aea..6213322040d088e3150e345aad91084622541042 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c: Improve test to prevent infinite
+       loop. (#74952, Thomas Leonard)
+
+       * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
+       Fix warning when toplevel menu shell isn't a menu
+       bar. (Thomas Leonard, #75602)
+
 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
 
         * configure.in: Use $PKG_CONFIG, not pkg-config.
index ebb3bbb4e152cc69ff373d59caaaf4cae49f5aea..6213322040d088e3150e345aad91084622541042 100644 (file)
@@ -1,3 +1,12 @@
+Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c: Improve test to prevent infinite
+       loop. (#74952, Thomas Leonard)
+
+       * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
+       Fix warning when toplevel menu shell isn't a menu
+       bar. (Thomas Leonard, #75602)
+
 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
 
         * configure.in: Use $PKG_CONFIG, not pkg-config.
index ebb3bbb4e152cc69ff373d59caaaf4cae49f5aea..6213322040d088e3150e345aad91084622541042 100644 (file)
@@ -1,3 +1,12 @@
+Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c: Improve test to prevent infinite
+       loop. (#74952, Thomas Leonard)
+
+       * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
+       Fix warning when toplevel menu shell isn't a menu
+       bar. (Thomas Leonard, #75602)
+
 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
 
         * configure.in: Use $PKG_CONFIG, not pkg-config.
index ebb3bbb4e152cc69ff373d59caaaf4cae49f5aea..6213322040d088e3150e345aad91084622541042 100644 (file)
@@ -1,3 +1,12 @@
+Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c: Improve test to prevent infinite
+       loop. (#74952, Thomas Leonard)
+
+       * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
+       Fix warning when toplevel menu shell isn't a menu
+       bar. (Thomas Leonard, #75602)
+
 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
 
         * configure.in: Use $PKG_CONFIG, not pkg-config.
index ebb3bbb4e152cc69ff373d59caaaf4cae49f5aea..6213322040d088e3150e345aad91084622541042 100644 (file)
@@ -1,3 +1,12 @@
+Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c: Improve test to prevent infinite
+       loop. (#74952, Thomas Leonard)
+
+       * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
+       Fix warning when toplevel menu shell isn't a menu
+       bar. (Thomas Leonard, #75602)
+
 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
 
         * configure.in: Use $PKG_CONFIG, not pkg-config.
index ebb3bbb4e152cc69ff373d59caaaf4cae49f5aea..6213322040d088e3150e345aad91084622541042 100644 (file)
@@ -1,3 +1,12 @@
+Wed Mar 20 11:32:07 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkentry.c: Improve test to prevent infinite
+       loop. (#74952, Thomas Leonard)
+
+       * gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
+       Fix warning when toplevel menu shell isn't a menu
+       bar. (Thomas Leonard, #75602)
+
 Wed Mar 20 11:00:59 2002  Owen Taylor  <otaylor@redhat.com>
 
         * configure.in: Use $PKG_CONFIG, not pkg-config.
index 00d67cbdd938183a24ff765f33525835b91a3907..c9d6d18fc2abd03214641f2745754d7903ba4701 100644 (file)
@@ -2214,7 +2214,8 @@ gtk_entry_real_activate (GtkEntry *entry)
       
          if (window &&
              widget != window->default_widget &&
-             !(!window->default_widget && widget == window->focus_widget))
+             !(widget == window->focus_widget &&
+               (!window->default_widget || !GTK_WIDGET_SENSITIVE (window->default_widget))))
            gtk_window_activate_default (window);
        }
     }
index 3c88397894f89461054c5bcc041e2c84d598ccfe..dac8ed4db1b55c783e3e9395ae683231452241d1 100644 (file)
@@ -1128,7 +1128,12 @@ gtk_real_menu_shell_cycle_focus (GtkMenuShell      *menu_shell,
                                 GtkDirectionType   dir)
 {
   while (menu_shell && !GTK_IS_MENU_BAR (menu_shell))
-    menu_shell = GTK_MENU_SHELL (menu_shell->parent_menu_shell);
+    {
+      if (menu_shell->parent_menu_shell)
+       menu_shell = GTK_MENU_SHELL (menu_shell->parent_menu_shell);
+      else
+       menu_shell = NULL;
+    }
 
   if (menu_shell)
     _gtk_menu_bar_cycle_focus (GTK_MENU_BAR (menu_shell), dir);